Skip to main content

CreateScalingGroup

Description

create a scaling group.

Request Method

POST

Request Path

/apsara/route/Ess/CreateScalingGroup

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
VSwitchIdBODYstringNoNo sample value for this parameter.If you create a VPC-type scaling group, you must specify the VSwitch ID.
LoadBalancerIdsBODYstringNoNo sample value for this parameter.load balancing instance ID list. A formatted Json Array:["lb-id0", "lb-id1",... "lb-idz"] supports up to 5 load balancing instances.
VSwitchIds.NBODYstringNoNo sample value for this parameter.If the current parameter is used, the VSwitchId parameter will be ignored. multi-zone parameter, the value range of n is [1, 5], creating a scaling group can specify up to 5 different virtual switches under the same VPC. the priority of the virtual switch is sorted by number, and 1 is the first priority for creating an instance. when an instance cannot be created in the available area where the virtual switch with higher priority is located, the virtual switch with the next priority will be automatically selected to create the instance.
MaxSizeBODYintegerYesNo sample value for this parameter.The maximum number of ECS instances in the scaling group. Value range:[0, 100].
versionBODYstringNo2016-01-01version of api
ScalingGroupNameBODYstringNoNo sample value for this parameter.the display name of the scaling group, 2-40 English or Chinese characters, starting with numbers, large and small letters or Chinese, and can contain numbers, "_", "-" or ".". The same user account is unique in the same region. If this parameter is not specified, the default value is ScalingGroupId.
MinSizeBODYintegerYesNo sample value for this parameter.The minimum number of ECS instances in the scaling group. Value range:[0, 100].
DefaultCooldownBODYintegerNoNo sample value for this parameter.the default cooling time of the scaling group, value range:[0, 86400], unit: seconds. The default value is 300 seconds.
regionIdBODYstringYesNo sample value for this parameter.region id
RemovalPolicy.NBODYstringNoNo sample value for this parameter.Policy for removing ECS instances from scaling groups. Optional value: OldestInstance: the earliest ECS instance added to the scaling group. NewestInstance: the latest ECS instance added to the scaling group. OldestScalingConfiguration: the instance created by the earliest scaling configuration. default values are: OldestScalingConfiguration, OldestInstance. You can enter up to 2.
RegionIdBODYstringYesNo sample value for this parameter.the region ID to which the scaling group belongs.
DBInstanceIdsBODYstringNoNo sample value for this parameter.RDS instance ID list. A formatted Json Array:["rm-id0", "rm-id1",... "rm-idz"], supports up to 8 RDS instances.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}